package xinyou.jh.net.heartLaw
{
	import xinyou.jh.net.JHStruct;
	
	
	/**
	 * 
	 * @author Administrator
	 * 心法相关的消息结构体
	 * 
	 */
	public class HeartLawStruct extends JHStruct
	{
		
		/*
		135
		// --心法&武功系统 [SXF 2012/11/30 16:26:05]
		enum eCG_MARTIAL_PROTOCOL
		{
		CG_MARTIAL_GENERAL_ACK				= 0,	// --心法通用返回
		CG_MARTIAL_LEARNMD_SYN				= 1,	// --学习心法请求
		CG_MARTIAL_LEARNMD_CMD				= 2,	// --学习心法通知
		CG_MARTIAL_LEVELUPMD_SYN			= 3,	// --升级心法请求
		CG_MARTIAL_LEVELUPMD_CMD			= 4,	// --升级心法通知
		CG_MARTIAL_EQUIPMD_SYN				= 5,	// --装备心法请求
		CG_MARTIAL_EQUIPMD_CMD				= 6,	// --装备心法通知
		CG_MARTIAL_UNEQUIPMD_SYN			= 7,	// --卸下心法请求
		CG_MARTIAL_UNEQUIPMD_CMD			= 8,	// --卸下心法通知
		CG_MARTIAL_NEWMARTIAL_CMD			= 10,	// --学习武功通知
		CG_MARTIAL_ADDMARTIAL_CMD			= 12,	// --添加武功通知
		CG_MARTIAL_DELMARTIAL_CMD			= 14,	// --删除武功通知
		
		//-- 心法列表 [2012-12-12 15:13:51 WZX]
		CG_MARTIAL_MEDITATIONLIST_SYN			= 15,	// --心法列表
		CG_MARTIAL_MEDITATIONLIST_CMD			= 16,	// --心法列表
		
		CG_MARTIAL_MEDITATIONDETAIL_SYN			= 17,	// --心法详细请求
		CG_MARTIAL_MEDITATIONDETAIL_CMD			= 18,	// --心法详细返回
		
		};
		
		*/
		
		public function HeartLawStruct()
		{
			super();
		}
		override protected function initReceiverHash():void
		{
			addReceiverHash([135,0],CG_MARTIAL_GENERAL_ACK);// -- 通用返回
			addReceiverHash([135,2],CG_MARTIAL_LEARNMD_CMD);// --学习心法通知	
			addReceiverHash([135,4],CG_MARTIAL_LEVELUPMD_CMD);// --升级心法通知	
			addReceiverHash([135,6],CG_MARTIAL_EQUIPMD_CMD);// --装备心法通知
			addReceiverHash([135,8],CG_MARTIAL_UNEQUIPMD_CMD);// --卸下心法通知
			addReceiverHash([135,10],CG_MARTIAL_NEWMARTIAL_CMD);// --学习武功通知
			addReceiverHash([135,12],CG_MARTIAL_ADDMARTIAL_CMD);// --添加武功通知
			addReceiverHash([135,14],CG_MARTIAL_DELMARTIAL_CMD);// --删除武功通知
			addReceiverHash([135,16],CG_MARTIAL_MEDITATIONLIST_CMD);// --心法列表
			addReceiverHash([135,18],CG_MARTIAL_MEDITATIONDETAIL_CMD);// --心法DETAIL列表
			
		}
		
		override protected function initSenderHash():void
		{
			addSenderHash([135,1],CG_MARTIAL_LEARNMD_SYN);//学习心法
			addSenderHash([135,3],CG_MARTIAL_LEVELUPMD_SYN);// --升级心法请求
			addSenderHash([135,5],CG_MARTIAL_EQUIPMD_SYN);// --装备心法请求
			addSenderHash([135,7],CG_MARTIAL_UNEQUIPMD_SYN);// --卸下心法请求
			addSenderHash([135,15],CG_MARTIAL_MEDITATIONLIST_SYN);// --心法列表
			addSenderHash([135,17],CG_MARTIAL_MEDITATIONDETAIL_SYN);// --心法DETAIL列表
		}
			
		//--------sender-----------------------
		public var CG_MARTIAL_LEVELUPMD_SYN:XML =
			<struct>
						DWORD			m_dwMeditationID;	
			</struct>;
				
		public var CG_MARTIAL_LEARNMD_SYN:XML =
			<struct>
						DWORD			m_dwNPCID;	
						DWORD			m_dwMeditationID;	
			</struct>;
		
		public var CG_MARTIAL_EQUIPMD_SYN:XML =
			<struct>
						DWORD			m_dwMeditationID;
						BYTE			m_byPosition;//-0~5
			</struct>;
		
		
		public var CG_MARTIAL_UNEQUIPMD_SYN:XML =
			<struct>
						DWORD			m_dwMeditationID;
			</struct>;
		public var CG_MARTIAL_MEDITATIONLIST_SYN:XML =
			<struct>
						BYTE			listType;
			</struct>;
		
		public var CG_MARTIAL_MEDITATIONDETAIL_SYN:XML =
			<struct>
						DWORD			m_dwMeditationID;	
			</struct>;
		
		
		//-------------------------------
		
		//--------receiver------------------
		public var CG_MARTIAL_GENERAL_ACK:XML =
			<struct>
						int				m_iErrorRes;
			</struct>;
		
		public var CG_MARTIAL_LEARNMD_CMD:XML =
			<struct>
						DWORD			m_dwMeditationID;	
			</struct>;
		
		public var CG_MARTIAL_LEVELUPMD_CMD:XML =
			<struct>
						DWORD			m_dwMeditationID;
						BYTE			m_byCurrLevel;
						Array DWORD	m_LearnMartialID[3];
			</struct>;
		
		
		public var CG_MARTIAL_EQUIPMD_CMD:XML =
			<struct>
						DWORD			m_dwMeditationID;
			</struct>;
		
		
		public var CG_MARTIAL_UNEQUIPMD_CMD:XML =
			<struct>
						DWORD			m_dwMeditationID;
			</struct>;
		
	
		public var CG_MARTIAL_NEWMARTIAL_CMD:XML =
			<struct>
						DWORD			m_dwMatialID;
			</struct>;
		
		public var CG_MARTIAL_ADDMARTIAL_CMD:XML =
			<struct>
						MARTIAL_INFO	m_MartialInfo;
			</struct>;

		public var CG_MARTIAL_DELMARTIAL_CMD:XML =
			<struct>
						DWORD			m_dwMatialID;
			</struct>;
		
		public var CG_MARTIAL_MEDITATIONLIST_CMD:XML =
			<struct>
						BYTE			listType;
						Array	DWORD 	xflist[BYTE];
			</struct>;
		
		public var CG_MARTIAL_MEDITATIONDETAIL_CMD:XML =
			<struct>
						DWORD			m_dwMeditationID;
						BYTE				m_byCurrLevel;
						Array DWORD		m_LearnMartialID[3];
			</struct>;
			
		//-----------------------------------------------------
		
		public var MARTIAL_INFO:XML =
			<struct>
						DWORD			m_dwMatialID;
						int				m_iMatialLv;
						DWORD			m_dwColdTime;
			</struct>;
	}
}